package com.itheima.reggie.service;

import com.itheima.reggie.pojo.AddressBook;
import org.apache.ibatis.annotations.Update;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface AddressBookService {
    void save(AddressBook addressBook);

    List<AddressBook> queryAddressList(Long userId);

    @Transactional
    void updateDefaultAddress(AddressBook addressBook);

    void updateAddress(AddressBook addressBook);

    AddressBook getById(Long id);

    void deleteById(Long id);

    AddressBook getDefaultAddress(Long userId);

}
